<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="f" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>商城首页</title>
    <link rel="stylesheet" type="text/css" href="${basePath}/public/css/common.css">
</head>
<body>
<div class="top-header">
    <div class="section">
        <div class="top-header-left f-left">
            <a href="#">LOGO</a>
        </div>
        <div class="top-header-right f-right">
            <c:choose>
                <c:when test="${empty user}">
                    <a href="${basePath}/home/vipUser/toLogin">登录</a>
                    <a href="${basePath}/home/vipUser/toRegisterVip">注册</a>
                    <a href="${basePath}/admin/adminUser/toLogin">后台</a>
                </c:when>
                <c:otherwise>
                    <a href="#">欢迎你!<W style="color: bisque;font-weight: bold; font-family: 微软雅黑; font-size: 20px;">${user.username}</W></a>
                    <a href="${basePath}/admin/adminUser/toLogin">后台</a>
                    <a href="${basePath}/home/vipUser/write">注销</a>
                </c:otherwise>
            </c:choose>
        </div>
    </div>
</div>

<div class="section nav-header">
    <ul class="nav-menus f-left">
        <li><a href="${basePath}/home/homepage/index">首页</a></li>
        <li><a href="${basePath}/home/homepage/toProductList">产品列表</a></li>
        <li><a href="${basePath}/home/cart">购物车</a></li>
        <li><a href="${basePath}/home/vipUser/index" >会员中心</a></li>
        <li><a href="${basePath}/home/News/toNews"  class="active">新闻资讯</a></li>
        <li><a href="${basePath}/home/pay/contact">联系我们</a></li>
    </ul>
    <div class="f-right nav-right">
        <input type="text" class="seacher-input f-left" placeholder="输入关键字">
        <a class="seacher-but  f-left" onclick="select()">搜索</a>
    </div>
</div>



<div class="section clearfix"  style="margin-top: 10px;">
    <!--/页面右边-->
    <div class="right-260">
        <div class="bg-wrap nobg">
            <div class="sidebar-box">
                <h4>资讯类别</h4>
                <ul class="navbar">

                    <li>
                        <h5><a href="#">互联网媒体</a></h5>
                        <p>
                            <a href="${basePath}/home/News/toNews?catalogId=1">人物动态</a>
                            <a href="${basePath}/home/News/toNews?catalogId=2">电子商务</a>
                            <a href="${basePath}/home/News/toNews?catalogId=3">传闻爆料</a>
                        </p>
                    </li>

                    <li>
                        <h5><a href="#">科技财经</a></h5>
                        <p>
                            <a href="${basePath}/home/News/toNews?catalogId=4">IT业界</a>
                            <a href="${basePath}/home/News/toNews?catalogId=5">经济民生</a>
                            <a href="${basePath}/home/News/toNews?catalogId=6">数码产品</a>
                        </p>
                    </li>

                    <li>
                        <h5><a href="#">汽车房产</a></h5>
                        <p>
                            <a href="${basePath}/home/News/toNews?catalogId=7">新车行情</a>
                            <a href="${basePath}/home/News/toNews?catalogId=8">房产动态</a>
                        </p>
                    </li>

                </ul>
            </div>
        </div>
    </div>
    <!--/页面右边-->

    <!--页面左边-->
    <div class="left-auto">
        <div class="bg-wrap">
            <ul class="n-list">
                <!--取得一个分页DataTable-->
                <c:forEach items="${list}" var="m">
                    <li>
                        <h2><a href="${basePath}/home/News/detail?id=${m.id}">${m.newsTitle}</a></h2>
                        <div class="note">

                            <b><img src="${basePath }/public/images${m.newsImg}"></b>
                            <p>${m.subTitle}…</p>
                            <div class="info">
                                <span><i class="iconfont icon-date"></i><f:formatDate value="${m.addTime}" pattern="yyyy-MM-dd HH:mm:ss"/></span>
                                <span>${m.countClick}人评论</span>
                                <span>${m.commentCount}次浏览</span>
                            </div>
                        </div>
                    </li>
                </c:forEach>
            </ul>

            <!--页码列表-->
            <div class="page-box">
                <div class="digg"></div>
            </div>
            <!--/页码列表-->

        </div>
    </div>
    <!--/页面左边-->
</div>



<div class="footer-copyright">
    <p>软信商城©2013-2017 软信大学版权所有 京ICP备17017089号 京公网安备11000002000006号</p>
</div>
</body>
</html>
